import logging
from packages.engine.core import Execution
from packages.engine.flow_interceptor import FlowInterceptor


class LeavePreInterceptor(FlowInterceptor):
    def intercept(self, execution: Execution):
        logging.debug(
            f"请假流程前置拦截器：LeavePreInterceptor,当前节点名：{execution.nodeModel.name}"
        )


class LeavePostInterceptor(FlowInterceptor):
    def intercept(self, execution: Execution):
        logging.debug(
            f"请假流程后置拦截器：LeavePostInterceptor,当前节点名：{execution.nodeModel.name}"
        )
